package 笔试.达达;

import java.util.*;
import java.util.concurrent.CountedCompleter;
import java.util.stream.Collectors;

/**
 * @author:谢君臣
 * @Date:2021/10/17-14:50
 * @version:1.0
 * @function:x00x 0xx0
 * 0xx0
 * x00x
 */
public class Main {
    public static void main1(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        for (int i = 1; i <= n / 2; i++) {
            for (int j = 1; j <= n; j++) {
                if (i == j || n - j + 1 == i) System.out.print("x");
                else System.out.print(0);
            }
            System.out.println();
        }
        if (n % 2 == 1) {
            for (int i = 1; i <= n; i++) {
                if (i == n / 2 + 1) System.out.print("x");
                else System.out.print(0);
            }
            System.out.println();
        }
        for (int i = n / 2; i > 0; i--) {
            for (int j = 1; j <= n; j++) {
                if (i == j || n - j + 1 == i) System.out.print("x");
                else System.out.print(0);
            }
            System.out.println();
        }
    }

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str1 = scanner.nextLine();
        String str2 = scanner.nextLine();
        int z = 0,c=0;
        int []arr = new int[26];
        HashSet<Integer> set = new HashSet<>();
        for (int i = 0; i < str1.length(); i++) {
            if (str1.charAt(i)==str2.charAt(i)) {
                set.add(i);
                z++;
            }else
                arr[str1.charAt(i)-'0'] = arr[str1.charAt(i)-'0']+1;
        }
        for (int i = 0; i < str2.length(); i++) {
            if (!set.contains(i)) {
                if (arr[str2.charAt(i)-'0']>0) {
                    arr[str2.charAt(i)-'0']--;
                    c++;
                }
            }
        }
        System.out.println(z+"Z"+c+"C");
    }
    public static int maxCoins(int[] array) {
        // todo 需要编写的核心代码
        int count =0;
        int n =array.length;
        int l = array[0];
        int r = array[array.length-1];
        ArrayList<Integer> list = new ArrayList();
        for (int i = 1; i < array.length-2; i++) {
            list.add(array[i]);
        }
        while (n>3){
            int index = 0;
            for (int i = 0; i < list.size(); i++) {
                if (list.get(index)>list.get(i))index=i;
            }
            int h = index-1>=0?list.get(index-1):l;
            int e = index+1<list.size()-1?list.get(index+1):r;
            count += e*h*list.get(index);
            n--;
            list.remove(index);
        }
        count += l*r + Math.max(l,r);
        return count;
    }

}
